package io.shuttle.mbe.api

import io.shuttle.mbe.api.types.Value1Function
import io.shuttle.mbe.core.Promise


interface Dns {
    fun resolve(
        // The result code. Zero indicates success.
        hostname: String,
        // @param {callback.resolveInfo}
        callback: Value1Function<ResolveCallbackResolveInfo>? = null
    ): Promise<Void>

    data class ResolveCallbackResolveInfo(
        // A string representing the IP address literal. Supplied only if resultCode indicates success.
        var address: String?,
        // The result code. Zero indicates success.
        var resultCode: Number,
    )
}